package com.yunji.app.message;

import com.yunji.base.business.SuggestBusiness;
import com.yunji.common.base.response.Response;
import com.yunji.common.base.response.ResponseHelper;
import com.yunji.common.model.dto.MemberSuggestDTO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;

/**
 * @Project: yunji-coffee
 * @Package: com.yunji.app.message
 * @Title: GateWaySuggestController
 * <p>
 * History:
 * Date                     Version     Author          Summary
 * ============================================================
 * 2024-10-30 18:19:07      V1.0        HuaAo       新建类
 */
@RestController
@Api(tags = "移动端-故障模块")
@RequestMapping("/gateway/suggest")
public class GateWaySuggestController {

    @Resource
    SuggestBusiness business;

    @ApiOperation("增加建议")
    @PostMapping("/addSuggest")
    public Response<?> addSuggest(@Valid @RequestBody MemberSuggestDTO dto) {
        return ResponseHelper.handle(business.create(dto), "创建失败");
    }

}